package com.xjj.test.demo.pageobject;

import com.sword.woodpecker.autotest.framework.annotation.PageObject;
import com.sword.woodpecker.autotest.framework.object.pageobject.BasePageObject;
import org.openqa.selenium.By;

/**
 * 类描述:〈百度首页PageObject〉
 */
@PageObject//通过@PageObject注解将类标记为PageObject
//继承com.sword.woodpecker.autotest.framework.object.pageobject.BasePageObject类
public class BaiduIndexPO extends BasePageObject {

  //关键字输入框
  protected By kwInput = By.id("kw");

  //百度一下按钮
  protected By submitBtn = By.id("su");

  /**
   * 方法功能描述: 输入搜索关键字
   *
   * @param keyWord 搜索关键字
   * @return void
   */
  public void inputKeyWord(String keyWord) {
    elementOperation.inputUntilDisplayed(kwInput, keyWord);
  }

  /**
   * 方法功能描述: 点击【百度一下】按钮
   *
   * @return void
   */
  public void clickSubmitBtn() {
    elementOperation.clickUntilClickable(submitBtn);
  }

}
